package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ImcCorpPurivewId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ImcCorpPurivewId implements java.io.Serializable {

	// Fields

	private Integer corpId;
	private Integer modelCorpId;
	private Integer mdfType;
	private String modelName;

	// Constructors

	/** default constructor */
	public ImcCorpPurivewId() {
	}

	/** full constructor */
	public ImcCorpPurivewId(Integer corpId, Integer modelCorpId,
			Integer mdfType, String modelName) {
		this.corpId = corpId;
		this.modelCorpId = modelCorpId;
		this.mdfType = mdfType;
		this.modelName = modelName;
	}

	// Property accessors

	@Column(name = "corp_id")
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	@Column(name = "model_corp_id")
	public Integer getModelCorpId() {
		return this.modelCorpId;
	}

	public void setModelCorpId(Integer modelCorpId) {
		this.modelCorpId = modelCorpId;
	}

	@Column(name = "mdf_type")
	public Integer getMdfType() {
		return this.mdfType;
	}

	public void setMdfType(Integer mdfType) {
		this.mdfType = mdfType;
	}

	@Column(name = "model_name", length = 20)
	public String getModelName() {
		return this.modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ImcCorpPurivewId))
			return false;
		ImcCorpPurivewId castOther = (ImcCorpPurivewId) other;

		return ((this.getCorpId() == castOther.getCorpId()) || (this
				.getCorpId() != null && castOther.getCorpId() != null && this
				.getCorpId().equals(castOther.getCorpId())))
				&& ((this.getModelCorpId() == castOther.getModelCorpId()) || (this
						.getModelCorpId() != null
						&& castOther.getModelCorpId() != null && this
						.getModelCorpId().equals(castOther.getModelCorpId())))
				&& ((this.getMdfType() == castOther.getMdfType()) || (this
						.getMdfType() != null && castOther.getMdfType() != null && this
						.getMdfType().equals(castOther.getMdfType())))
				&& ((this.getModelName() == castOther.getModelName()) || (this
						.getModelName() != null
						&& castOther.getModelName() != null && this
						.getModelName().equals(castOther.getModelName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		result = 37
				* result
				+ (getModelCorpId() == null ? 0 : this.getModelCorpId()
						.hashCode());
		result = 37 * result
				+ (getMdfType() == null ? 0 : this.getMdfType().hashCode());
		result = 37 * result
				+ (getModelName() == null ? 0 : this.getModelName().hashCode());
		return result;
	}

}